﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Gasco.Business.Services;
using Gasco.DataAccess;
using Mani.Common;

public partial class Controls_personal_contact_view : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["id"] != null)
        {
            ContactService cs = new ContactService();
            contact c = cs.GetContactById(Convert.ToInt16(Request.QueryString["id"]));
            lbNameValue.Text = c.name;
            lbIdentityNum.Text = c.personal_contact.identity_id;
            lbNationalCodeValue.Text = c.personal_contact.national_code;
            lbBirthday.Text = c.personal_contact.birthday.ToJalali();
            lbFatherNameValue.Text = c.personal_contact.father_name;
            lbWorkTelValue.Text = c.personal_contact.work_tel;
            lbHomeTelValue.Text = c.personal_contact.home_tel;
            lbMibileValue.Text = c.personal_contact.mobile;
            lbAccountInfoValue.Text = c.account_info;
            lbEmailValue.Text = c.email;
            lbFaxValue.Text = c.fax;
            lbAddressValue.Text = c.address;
        }
    }
}
